<!-- 留言列表 -->
<template>
    <div class="page-box h100 display-flex czbj">
        <div>
            <dxtable :isshowXz="false" :headBtn="headBtn" :dataJson="dataJson" :portUrl="portUrl" :qx="qx" ref="databale"></dxtable>
        </div>
    </div>
</template>
<script lang='ts' setup>
import dxtable from "./../../components/util/dxtable.vue";
import sort from "./../../components/util/sort.vue";
import { dxget, dxpost, qurl, hf } from "./../../util/index";
import { h, ref, reactive } from "vue";
import { types } from "./public/index";
const props = defineProps({
    pup: { type: String },
});
let headBtn = [];
const databale = ref();
const initeer = () => {
    databale.value.initDataExpose();
};
const emit = defineEmits(["callBack"]);
// 弹窗公用该列表
let dataJson = reactive([

 
    {
        title: "产品名称",
        key: "productName",
        search: true, // 是否在搜索栏展示
    },{
        title: "医院名称",
        key: "NameHospital",
        search: true, // 是否在搜索栏展示
    },{
        title: "姓名",
        key: "name",
        search: true, // 是否在搜索栏展示
    },{
        title: "性别",
        type:"select",
        key: "sex",
        search: true, 
        options:[{label:"男",value:1},{label:"女",value:2}],
        render(row) {
            return row.sex==1?'男':"女"
        }
    },{
        title: "联系电话",
        key: "phone",
        search: true, // 是否在搜索栏展示
    },
    {
        title: "邮箱",
        key: "email",
        search: true, // 是否在搜索栏展示
    },
    {
        title: "排序",
        width: 100,
        render(row) {
            row.databaseName = "djconsult";
            return h(sort, {
                row,
                onCallBack: () => {
                    initeer();
                },
            });
        },
    },
    {
        title: "留言时间时间",
        key: "addTime",
        width: "200",
        type: "daterange",
    },
]);
let portUrl = "djhs/djconsult";
const qx = {
    DeletePermissionID: "djhsmessagedel", //删除
    EditPermissionIdentifier: "djhsmessagebj", // 编辑
    NewPermissionIdentifier: "djhsmessagexz", // 新建
    ViewPermissionID: "djhsmessageck", // 查看
};


let pupVal = props.pup;
if (pupVal) {
    headBtn = [
        {
            name: "确认选择 ",
            async clickFun(row) {
                const arrList = row.join(",");
                emit("callBack", arrList);
            },
        },
    ];
}
</script>
  
  
  